package com.hhd.flow.controller;

import com.hhd.flow.vo.ActionAuthVo;
import com.hhd.flow.vo.Result;
import com.hhd.flow.utils.CommonUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/auth")
public class ActionAuthController {

    @RequestMapping("/loadActionAuth")
    public Result loadActionAuth(String formType) {
        List res = CommonUtils.newList();
        for (int i = 0; i < 10; i++) {
            res.add(createAuth(i));
        }
        return Result.ok(res);
    }

    private ActionAuthVo createAuth(int i) {
        ActionAuthVo authVo = new ActionAuthVo();
        authVo.setValue("auth" + i);
        authVo.setTitle("测试权限" + i);

        return authVo;
    }
}
